#!/usr/bin/python

import time, sys
from math import sqrt, ceil, floor, log10

""" 

the sum of 10! is 3628800

Find the sum of the digits in 100!
    
"""

def factorial(n):
    if n == 1:
        fact = 1
    else:
        fact = n * factorial(n-1)
    return fact



def main():
    start = time.time()
    
    n = 100
    sum = 0
    fact = factorial(n)
    fstring = str(fact)
    for ind in xrange(len(fstring)):
        digit = int(fstring[ind])
        sum += digit
    print fstring
    print sum
    
    print '{0:.2f} s'.format(time.time() - start)  

# answer: 648 in 0.00 s !!
    
    
if __name__ == '__main__':
  main()

